int x = -1;
int y = -1;

void setup() {
  size(400,400);
  background(255);
}

void draw() {
  if (x >= 0) {
    line(x,y,mouseX,mouseY);
  }
}

void mousePressed() {
  x = mouseX;
  y = mouseY;
}  
